home *** CD-ROM | disk | FTP | other *** search
- DOCIT V1.11 File docit Date Dec 20 1989 04:40 Page : 1
-
- 1 DOCIT - INTRODUCTION ...................................................... 1
- 1.1 Purpose of program ................................................... 1
- 1.2 How to use program ................................................... 1
- 2 COMMAND LINE SWITCHES ..................................................... 2
- 2.1 Short summary ....................................................... 2
- 2.2 Long summary ........................................................ 3
- 3 EMBEDDED COMMANDS ......................................................... 4
- 3.1 table of commands .................................................... 4
- 3.2 doc-on, doc-off, page break .......................................... 4
- 3.3 include file ......................................................... 4
- 3.4 table of contents entry .............................................. 5
- 4 EXAMPLES .................................................................. 6
- 4.1 embedded command ..................................................... 6
- 4.2 filelist ............................................................. 7
- 5 LICENSE & DISCLAIMER ...................................................... 8
- DOCIT V1.11 File docit.lst Date Dec 20 1989 04:40 Page : 1
-
-
- DOCIT was designed to quickly generate a hardcopy of function headers for
- easy reference. With DOCIT you can avoid having to maintain both the
- source file and a summary file. While the summary is convenient for finding
- a required function and it's arguments without showing source, it is often
- overlooked when modifications are done or new functions added.
-
- DOCIT redirects the header and any other pertinent information
- from the source code itself into a file to be printed. DOCIT will also
- generate a table of contents to quickly find the desired function. Now
- there is no need to wade through hundreds of pages of source looking for
- the right function. Simply go down the list of functions in the table
- of contents, and then turn to the correct page. And the information
- will be accurate since this IS the header for the function, not just
- poorly maintained copy of the header.
-
- DOCIT works by searching for commands embedded in comments throughout
- source code. Commands such as document on, document off, page break,
- table of contents entry and include file (for copyright notices etc).
- Using a text file with a list of source files stored in it, DOCIT can
- generate a function library users manual in minutes. And DOCIT will support
- C, Pascal, Basic, Assemble and text files.
-
-
-
- The following steps will get you on your way to having a neat professional
- library reference manual in no time.
-
- 1) Learn the basic DOCIT commands (doc on, doc off, page break
- include file, table of contents entry). See the section on
- commands for a complete explanations.
-
- 2) Add the DOCIT commands to your function headers, and anywhere
- that you want to have notes (or source) show up in your
- reference manual. In most cases, the commands will consist of
- turning the document mode on at the top of the function header
- turning it off at the bottom of the header, and putting in
- a table of contents marker.
-
- 3) Create a file with a list of all source code files (including
- full path name). See the section on filelists an example.
-
- 4) Run DOCIT. On your initial run, be sure to watch the DOCIT screen
- output for warnings. For example, if you forgot to turn document
- mode off, then DOCIT will tell you.
-
- 5) Print out the table of contents and the document listing.
-
- DOCIT V1.11 File docit.lst Date Dec 20 1989 04:40 Page : 2
-
- Extract documentation from source files for listings
-
- Usage : DOCIT -lfile [-ofile][-ipath][-ipath][-pnn][-v][-w][-t][-h]
-
- -l : filelist filename -o : output filename
- -p : lines/page -t : no table of contents
- -w : warnings off -v : verbose off
- -i : include path search list
-
- -h : INTERACTIVE HELP - description, use and examples
-
- If you find DOCIT useful, a contribution of $15.00 would be appreciated.
- With a contribution of $25.00 or more you will be registered to receive a
- disk with the next version of DOCIT when it is released. Please state the
- current version of software that you have. Send contributions and any
- suggestions for improving the program to :
- J. Allamby
- P.O. Box 435,
- Pickering,
- Ontario, Canada
- L1V 1C0
- DOCIT V1.11 File docit.lst Date Dec 20 1989 04:40 Page : 3
-
- List of command line switches
- -l list filename - DOCIT requires a file with a list of all files to be
- scanned. If no extension is given, then ".DML" is
- used.
-
- -t no index - The user can request that no table of contents be
- generated.
-
- -o output filename - By default, DOCIT will use the same filename as the
- list file with the extension ".OUT". The user can
- override that with a new name
-
- -w warnings off - By default, DOCIT will warn the user if it found an
- unmatched doc on/off command, if it could not open
- an include file, or if the syntax was incorrect for
- either the include file command or the table of
- contents. The -w message will suppress these messages
-
-
-
- List of command line switches (continued)
- -v verbose off - By default, DOCIT will provide a summary for each file
- as it is processed. The user can suppress this by using
- the -v command.
-
- -p lines/page - By default, the number of lines per page is 65. The
- user can specify the number of lines per page to suit.
-
- -i include path - The user can specify the -i command as many times as
- required to list all search paths for include files.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- DOCIT V1.11 File docit.lst Date Dec 20 1989 04:40 Page : 4
-
- The following table lists the commands available and their form
- within each type of language specified
-
- FILE_TYPE DOC ON DOC OFF PAGE BREAK INCLUDE FILE TOC ENTRY
- .c /*+d*/ /*-d*/ /*+p*/ /*+i"file"*/ /*+s0"string"*/
- .asm ;;+d;; ;;-d;; ;;+p;; ;;+i"file";; ;;+s0"string";;
- .pas {*+d*} {*-d*} {*+p*} {*+i"file"*} {*+s0"string"*}
- .bas REM +d REM -d REM +p REM +i"file" REM +s0"string"
-
-
- IMPORTANT - Please note that the all commands are
- in lowercase.
-
-
-
-
-
-
-
-
-
-
- DOCIT Embedded command list
- DOC ON This command will direct all proceeding text to the output file.
- DOCIT does not support multiple levels of document on.
- If DOCIT encounters a DOC ON command when document is already
- on, then a warning will be issued.
-
- Example : /*+d*/
-
- DOC OFF This command will stop directing text to the output file.
- DOC ON and DOC OFF should be used in pairs. A warning will be
- issued if a DOC OFF command is encountered when document mode
- is already off. DOCIT will also display a warning if document
- mode is still on at the end of a file (not an included file).
-
- Example : /*-d*/
-
- PAGE BREAK PAGE BREAK will start a new page on the output file.
-
- Example : /*+p*/
-
-
-
-
-
- DOCIT Embedded command list (continued)
- INCLUDE FILE The INCLUDE FILE will begin reading text from file specified.
- The user can specify the INCLUDE FILE command to a depth of 10
- files. The state of the document mode (on/off) will be as set
- by the file above the included file. In order to find include
- files in different directories, DOCIT uses the -i command line
- option to allow a user to enter 1 or more search paths. DOCIT
- will search the current directory first.
-
- Example : /*+i"struct.h"*/
-
-
-
-
-
-
- DOCIT V1.11 File docit.lst Date Dec 20 1989 04:40 Page : 5
-
-
-
- DOCIT Embedded command list (continued)
- TOC ENTRY The TOC ENTRY command allows the user to make additions
- to the table of contents. Some examples of the command are :
-
- /*+s0"DATABASE ROUTINES"*/
- /*+s1"DBSINT - Initialize database"*/
- /*+s1"DBSTRM - Terminate database"*/
- /*+s2"DBSSTA - Get stats"*/
-
- The TOC ENTRY command consists of two parts. The first
- part is the section modifier, which is a single digit
- proceeding the 's' identifier. The digit can be from 0 to 9
- inclusive. The second part is the user provided string. Each
- entry in the table of contents has associated with it a
- section number and 0 or more sub-sections.
- The examples given above will be saved in table of contents as
-
- 1 DATABASE ROUTINES ..................................... 1
- 1.1 DBSINT - Initialize database ..................... 1
- 1.2 DBSTRM - Terminate database ...................... 1
- 1.2.1 DBSSTA - Get stats ........................... 1
-
- DOCIT Embedded command list (continued)
-
- Notice how the "s0" entry displays only the section value
- and the first "s1" displays the section number plus one
- sub-section value. A second "s1" will increment the sub-
- section value by 1.
- DOCIT will automatically save the output listing page number
- where the TOC entry was located.
-
- 1 DATABASE ROUTINES ..................................... 1
- 1.1 DBSINT - Initialize database ..................... 1
- 1.2 DBSTRM - Terminate database ...................... 1
- 1.2.1 DBSSTA - Get stats ........................... 1
-
-
-
-
-
- DOCIT V1.11 File docit.lst Date Dec 20 1989 04:40 Page : 6
-
- The following is a sample of a function header formatted for use by DOCIT.
- It contains commands for both documenting and the table of contents.
-
- /*+p*/
- /*+s0"STRLIB - String manipulation library"*/
- /*+s1"STRCMP - Compare 2 strings"*/
- /*+d*/
- /********************************************
- Function : strcmp
- Purpose : Compare 2 strings
- Call : strcmp(s,t)
- Args
- char *s,*t
- Return
- < 0 if s < t, 0 if s = t, > 0 if s > t
- ********************************************/
- strcmp(s,t)
- char s[],t[];
- /*-d*/
- {
- body of function
- }
-
- The preceeding example will produce the following entries in the table of
- contents
-
- 1 STRLIB - Sting manipulation library ......................... 1
- 1.1 STRCMP - Compare 2 strings ............................. 1
-
-
-
-
-
-
-
-
-
-
-
-
- The following is the output file produced by the header
-
- DOCIT V1.08 File h:\lib\str\strlib.c Date Nov 23 1989 Page : 1/1
- /********************************************
- Function : strcmp
- Purpose : Compare 2 strings
- Call : strcmp(s,t)
- Args
- char *s,*t
- Return
- < 0 if s < t, 0 if s = t, > 0 if s > t
- ********************************************/
- strcmp(s,t)
- char s[],t[];
-
-
-
-
-
-
-
- DOCIT V1.11 File docit.lst Date Dec 20 1989 04:40 Page : 7
-
- In order for DOCIT to search the required files, the user must provide
- a file with all source files explicitly listed, one per line in the file
- with the full path name. Since DOCIT determines the type of file given by
- the file extension, a mechanism has been added to allow other file
- extensions to be listed. Immediately after the filename, add the class of file
- that it belongs to. Valid classes are as follows
-
- .c .pas .bas .asm (.s) .txt
-
- This is a sample filelist as expected by DOCIT
-
- C:\LIB\SRC\DECODE.C
- C:\LIBSRC\LIBRTN.H .C
- C:\PROJ1\HDWRTN.ASM
- DRIVER.C
- C:\PROJ1\EDITOR.PAS
- C:\PROJ2\EDIT.INC .PAS
-
-
-
-
-
- DOCIT V1.11 File docit.lst Date Dec 20 1989 04:40 Page : 8
-
- You are free to use, copy and distribute DOCIT for noncommercial use IF :
-
- NO FEE IS CHARGED FOR USE, COPYING OR DISTRIBUTION,
- AND IT IS NOT MODIFIED IN ANY WAY.
-
- This program is provided AS IS without any warranty, expressed or implied,
- including but not limited to fitness for a particular purpose.
-
-
-
-